<!DOCTYPE html>
<html lang="zh_CN" style="overflow: hidden;">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <meta charset="utf-8">
    <title>{:lang('ADMIN_CENTER')}</title>

    <meta name="description" content="This is page-header (.page-header &gt; h1)">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- <link href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/bootstrap.min.css" rel="stylesheet"> -->
    <!-- <link href="__TMPL__/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet"> -->
    <link href="__STATIC__/font-awesome/css/font-awesome.min.css?page=index" rel="stylesheet" type="text/css">

    <link rel="stylesheet" href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/css/layui.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/css/admin.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/theme.css">

    <!-- <link rel="stylesheet" href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/simplebootadminindex.min.css"> -->
    <script>
        //全局变量
        var GV = {
            HOST: "{$_SERVER['HTTP_HOST']}",
            ROOT: "__ROOT__/",
            WEB_ROOT: "__WEB_ROOT__/",
            JS_ROOT: "static/js/"
        };
    </script>
    <php>$submenus=$menus;</php>

    <php>function getsubmenu($submenus){</php>
    <notempty name="submenus">
        <php>foreach($submenus as $menu){</php>
            <php>
                $menu_name=lang($menu['lang']);
                $menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
            </php>
            <php>if(empty($menu['items'])){</php>
                <li class="layui-nav-item">
                    <a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);" lay-tips="{$menu_name}" lay-direction="2">
                        <span class="menu-icon">
                            <i class="fa fa-{$menu.icon|default='desktop'}"></i>
                        </span>
                        <cite>{$menu_name}</cite>
                    </a>
                </li>
            <php>}else{</php>
                
                <li class="layui-nav-item">
                    <a href="javascript:;" lay-tips="{$menu_name}" lay-direction="2">
                        <span class="menu-icon">
                            <i class="fa fa-{$menu.icon|default='desktop'}"></i>
                        </span>
                        <cite>{$menu_name}</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <php>getsubmenu1($menu['items'])</php>
                    </dl>
                </li>
            <php>}</php>

        </li>

        <php>}</php>
    </notempty>
    <php>}</php>

    <php>function getsubmenu1($submenus){</php>
        <php>foreach($submenus as $menu){</php>
                <php>
                    $menu_name=lang($menu['lang']);
                    $menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
                </php>
                <php>if(empty($menu['items'])){</php>
                    <dd>
                        <a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">{$menu_name}</a>
                    </dd>
                <php>}else{</php>
                    <a href="javascript:;">{$menu_name}</a>

                    <dl class="layui-nav-child">
                        <php>getsubmenu2($menu['items'])</php>
                    </dl>
                <php>}</php>
        <php>}</php>
    <php>}</php>

    <php>function getsubmenu2($submenus){</php>
        <php>foreach($submenus as $menu){</php>
                <php>
                    $menu_name=lang($menu['lang']);
                    $menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
                </php>
                <dd>
                    <a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">{$menu_name}</a>
                </dd>
        <php>}</php>
    <php>}</php>


    <if condition="APP_DEBUG">
        <style>
            #think_page_trace_open {
                left: 0 !important;
                right: initial !important;
            }
        </style>
    </if>
</head>

<body class="layui-layout-body">
    <div id="LAY_app">
        <div class="layui-layout layui-layout-admin">
            <div class="layui-header">
                <!-- 头部区域 -->
                <ul class="layui-nav layui-layout-left">
                    <li class="layui-nav-item layadmin-flexible" lay-unselect>
                        <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
                            <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
                            <span class="title">收起菜单</span>
                        </a>
                    </li>
                    <!-- <li class="layui-nav-item" lay-unselect>
                        <a href="{$browse_url}" target="_blank" title="访问站点">
                            <i class="layui-icon layui-icon-website"></i>
                            访问站点
                        </a>
                    </li> -->
                    <li class="layui-nav-item" lay-unselect>
                        <a id="refresh-wrapper" href="javacript:void(0);" title="{:lang('REFRESH_CURRENT_PAGE')}" class="refresh">
                            <i class="layui-icon layui-icon-refresh-3"></i>
                            刷新
                        </a>
                    </li>
                </ul>
                <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
                    <if condition="APP_DEBUG">
                        <li class="layui-nav-item" lay-unselect>
                            <a class="menu"
                               href="javascript:openapp('{:url('admin/Menu/index')}','index_menu','{:lang('ADMIN_MENU_INDEX')}',true);"
                               title="{:lang('ADMIN_MENU_INDEX')}">
                               <i class="layui-icon layui-icon-more"></i>
                               后台菜单
                            </a>
                        </li>
                    </if>
                    <if condition="cmf_auth_check(cmf_get_current_admin_id(),'admin/Setting/clearcache')">
                        <li class="layui-nav-item" lay-unselect>
                            <a class="clear"
                               href="javascript:openapp('{:url('admin/Setting/clearcache')}','index_clearcache','{:lang('ADMIN_SETTING_CLEARCACHE')}',true);"
                               title="{:lang('ADMIN_SETTING_CLEARCACHE')}">
                                <i class="fa fa-trash-o"></i>
                                <!-- <i class="layui-icon layui-icon-delete"></i> -->
                                {:lang('ADMIN_SETTING_CLEARCACHE')}
                            </a>
                        </li>
                    </if>
                    <!-- <li class="layui-nav-item layui-hide-xs" lay-unselect>
                    <a href="javascript:;" layadmin-event="note">
                    <i class="layui-icon layui-icon-note"></i></a>
                    </li> -->
                    
                    <if condition="$sites">
                        <li class="layui-nav-item" lay-unselect>
                            <a href="javascript:;">
                                <cite title="切换站点">{$site.name}</cite></a>
                            <dl class="layui-nav-child">
                                <volist name="sites" id="vo">
                                    <dd>
                                        <a href="{:url('admin/Site/select',array('id'=>$vo['site_id']))}">{$vo.name}</a>
                                    </dd>
                                </volist>
                            </dl>
                        </li>
                    </if>
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;">
                            <cite>{$admin.user_login}</cite></a>
                        <dl class="layui-nav-child">
                            <if condition="cmf_auth_check(cmf_get_current_admin_id(),'admin/Setting/password')">
                                <dd>
                                    <a href="javascript:openapp('{:url('setting/password')}','index_password','{:lang('ADMIN_SETTING_PASSWORD')}');">{:lang('ADMIN_SETTING_PASSWORD')}</a>
                                </dd>
                            </if>
                            <hr>
                            <dd style="text-align: center;">
                                <a href="{:url('Public/logout')}">{:lang('LOGOUT')}</a>
                            </dd>
                        </dl>
                    </li>
                    <!-- <li class="layui-nav-item layui-hide-xs" lay-unselect>
                    <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a></li>
                    <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
                    <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a></li> -->
                </ul>
            </div>
            <!-- 侧边菜单 -->
            <div class="layui-side layui-side-menu">
                <div class="layui-side-scroll">
                    <div class="layui-logo">
                        <a href="{:url('admin/index/index')}">
                            <span class="block menu-home"> </span>
                        </a>
                    </div>
                    <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
                        {:getsubmenu($submenus)}
                    </ul>
                </div>
            </div>
            <!-- 页面标签 -->
                <div class="layadmin-pagetabs navbar navbar-default">
                    <div id="task-pre" class="layui-icon layadmin-tabs-control layui-icon-prev"></div>
                    <div id="task-next" class="layui-icon layadmin-tabs-control layui-icon-next"></div>
                    <div id="task-content">
                        <ul class="layui-tab-title" id="task-content-inner">
                            <li class="cmf-component-tabitem noclose layui-this" app-id="0" app-url="{:url('main/index')}"
                                app-name="首页">
                                <a class="cmf-tabs-item-text"><i class="layui-icon layui-icon-home"></i></a>
                            </li>
                        </ul>
                    </div>
                    <div class="layui-icon layadmin-tabs-control layui-icon-down">
                        <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
                            <li class="layui-nav-item" lay-unselect>
                                <a href="javascript:;"></a>
                                <dl class="layui-nav-child layui-anim-fadein">
                                    <dd>
                                        <a href="javascript:closeThisTabs();">关闭当前标签页</a>
                                    </dd>
                                    <dd>
                                        <a href="javascript:closeOtherTabs();">关闭其它标签页</a>
                                    </dd>
                                    <dd>
                                        <a href="javascript:closeAllTabs();">关闭全部标签页</a>
                                    </dd>
                                </dl>
                            </li>
                        </ul>
                    </div>
                </div>
            <php>/*
            <div class="layadmin-pagetabs" id="LAY_app_tabs">
                <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
                <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
                <div class="layui-icon layadmin-tabs-control layui-icon-down">
                    <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
                        <li class="layui-nav-item" lay-unselect>
                            <a href="javascript:;"></a>
                            <dl class="layui-nav-child layui-anim-fadein">
                                <dd layadmin-event="closeThisTabs">
                                    <a href="javascript:;">关闭当前标签页</a></dd>
                                <dd layadmin-event="closeOtherTabs">
                                    <a href="javascript:;">关闭其它标签页</a></dd>
                                <dd layadmin-event="closeAllTabs">
                                    <a href="javascript:;">关闭全部标签页</a></dd>
                            </dl>
                        </li>
                    </ul>
                </div>
                <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
                    <ul class="layui-tab-title" id="LAY_app_tabsheader">
                        <li lay-id="home/console.html" class="layui-this">
                            <i class="layui-icon layui-icon-home"></i>
                        </li>
                    </ul>
                </div>
            </div>
            */</php>
            <!-- 主体内容 -->
            <div class="layui-body" id="content">
                <iframe src="{:url('Main/index')}" style="width:100%;height: 100%;" frameborder="0" id="appiframe-0"
                            class="appiframe layadmin-iframe"></iframe>
            </div>
            <!-- 辅助元素，一般用于移动设备下遮罩 -->
            <div class="layadmin-body-shade" layadmin-event="shade"></div>
        </div>
    </div>

<script src="__TMPL__/public/assets/js/jquery-1.10.2.min.js"></script>
<script src="__STATIC__/js/wind.js"></script>
<!-- <script src="__TMPL__/public/assets/js/bootstrap.min.js"></script> -->
<script src="__STATIC__/js/admin.js"></script>


<script src="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/layui.all.js"></script>
<script src="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/admin.js"></script>
<script src="__TMPL__/public/assets/simpleboot3/js/adminindex.js"></script>

</body>
</html>
